package com.tkuniyoshi.battleship.server.common.log.logmessage;

import java.util.logging.Logger;

public class BaseLogger {
	private Logger logger = null;

	protected BaseLogger(Class className) {
		logger = Logger.getLogger(className.getName());
	}
	
	protected void log(LogMessage message) {
		logger.log(message.getLogLevel(), message.getMessage());
	}
	
	protected void log(LogMessage message,Object param) {
		logger.log(message.getLogLevel(), message.getMessage(param));
	}
	
	protected void log(LogMessage message,Object[] param) {
		logger.log(message.getLogLevel(), message.getMessage(param));
	}
	
	protected void log(LogMessage message,Throwable throwable){
		logger.log(message.getLogLevel(),message.getMessage(),throwable);
	}
	
	protected void log(LogMessage message,Object[] param,Throwable throwable){
		logger.log(message.getLogLevel(),message.getMessage(param),throwable);
	}
}
